package com.wctj.api.infra.huifu.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.wctj.api.infra.common.bean.param.ResponsePayInfo;

import java.util.Map;

/**
 * 响应支付结果信息
 */
public class HuiFuResponsePayInfo extends ResponsePayInfo {

    /**
     * 用户账单上的商户订单号
     */
    @JsonProperty("party_order_id")
    private String partyOrderId;
    /**
     * 交易金额（必须大于 0），保留两位小数点，如0.10、100.05等
     */
    @JsonProperty("pay_amt")
    private String payAmt;

    /**
     * 支付渠道请求成功返回的额外参数。详见 支付渠道 expend参数 说明
     * https://docs.adapay.tech/api/trade.html#id2
     */
    @JsonProperty("expend")
    private Expend expend;

    /**
     * 是否 prod模式，true 是 prod模式，false 是 mock模式
     */
    @JsonProperty("prod_mode")
    private Boolean prodMode;

    /**
     * 支付渠道，参见 支付渠道 说明 https://docs.adapay.tech/api/appendix.html#id2
     */
    @JsonProperty("pay_channel")
    private String payChannel;

    /**
     * 可临时用来查询支付订单状态的链接，此链接的有效期只有30分钟
     */
    @JsonProperty("query_url")
    private String queryUrl;

    /**
     * 支付对象，payment
     */
    @JsonProperty("object")
    private String object;

    @JsonIgnore
    private Map<String, Object> requestParams;

    public String getPartyOrderId() {
        return partyOrderId;
    }

    public void setPartyOrderId(String partyOrderId) {
        this.partyOrderId = partyOrderId;
    }

    public String getPayAmt() {
        return payAmt;
    }

    public void setPayAmt(String payAmt) {
        this.payAmt = payAmt;
    }

    public Expend getExpend() {
        return expend;
    }

    public void setExpend(Expend expend) {
        this.expend = expend;
    }

    public Boolean getProdMode() {
        return prodMode;
    }

    public void setProdMode(Boolean prodMode) {
        this.prodMode = prodMode;
    }

    public String getPayChannel() {
        return payChannel;
    }

    public void setPayChannel(String payChannel) {
        this.payChannel = payChannel;
    }

    public String getQueryUrl() {
        return queryUrl;
    }

    public void setQueryUrl(String queryUrl) {
        this.queryUrl = queryUrl;
    }

    public String getObject() {
        return object;
    }

    public void setObject(String object) {
        this.object = object;
    }

    public Map<String, Object> getRequestParams() {
        return requestParams;
    }

    public void setRequestParams(Map<String, Object> requestParams) {
        this.requestParams = requestParams;
    }


    // Expend 类
    public static class Expend {
        @JsonProperty("pay_info")
        // Map 结构的字符串
        private String payInfo;

        @JsonProperty("token_id")
        private String tokenId;

        public String getPayInfo() {
            return payInfo;
        }

        public void setPayInfo(String payInfo) {
            this.payInfo = payInfo;
        }

        public String getTokenId() {
            return tokenId;
        }

        public void setTokenId(String tokenId) {
            this.tokenId = tokenId;
        }
    }

}
